package com.dragon.modules.yuegou.mapper.wallet;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dragon.modules.yuegou.entity.wallet.CardScopeMerchantEntity;
import com.dragon.modules.yuegou.model.merchant.Merchant;
import com.dragon.modules.yuegou.model.wallet.CardScopeMerchant;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 悦卡使用范围：商户 Mapper接口
 *
 * @author pbuilder generated
 * @date 2019-03-05 11:27:22
 * @version 2.0
 */
@Component("waltCardScopeMerchantMapper")
public interface CardScopeMerchantMapper extends BaseMapper<CardScopeMerchantEntity> {

    /**
     * 根据模板id  查询可用商户名称
     * @param cardTemplateId
     * @return
     */
    List<CardScopeMerchant> getScopeBusdName(@Param("cardTemplateId") String cardTemplateId);


    /**
     *  查询可用商户
     * @param cardTemplateId
     * @param toPage
     * @return
     */
    List<Merchant> merchantScope(@Param("cardTemplateId")String cardTemplateId, IPage<Merchant> toPage);

    /**
     * 查看悦卡可用商户
     * @param cardTemplateId
     * @return
     */
    List<CardScopeMerchant> merchantScopeList(String cardTemplateId);

    /**
     * 查询悦卡所属商圈
     * */
	List<String> buadIdList(String id);
}
